<div dw-loading="tableShopLoading" class="pd10">
    <table class="responsive-table centered bordered">
        <thead>
            <tr>
                <th class="pigTh">商品</th>
                <th>标题</th>
                <th>品牌</th>
                <th>
                    <span>成交均价</span>
                </th>
                <th ng-click="vm.sort('sell_money','down')">
                    <span class="cp">近30天销售额</span>
                    <i class="caret down icon cp" ng-class="{'caret down icon cp':true,'green-text':vm.filter.sortColumn == 'sell_money'}"></i>
                </th>
                <th ng-click="vm.sort('sell_amount','down')">
                    <span class="cp">近30天销售量</span>
                    <i class="caret down icon cp" ng-class="{'caret down icon cp':true,'green-text':vm.filter.sortColumn == 'sell_amount'}"></i>
                </th>
                <th>查看数据</th>
                <th>监控数据</th>
                <th>监控</th>
            </tr>
        </thead>
        <tbody>
            <tr class="repeat-item" dir-paginate="prod in vm.table.products | itemsPerPage: 11" total-items="vm.table.count" current-page="vm.filter.newPageNumber" pagination-id="tableShopProds">
                <td ng-if="prod.numberId">
                    <a href="https://item.taobao.com/item.htm?id={{prod.numberId}}" target="_blank">
                        <img ng-src="{{prod.picUrl}}" class="w65">
                    </a>
                </td>
                <td ng-if="prod.numberId">
                    <a title="{{prod.title}}" href="https://item.taobao.com/item.htm?id={{prod.numberId}}" target="_blank" ng-bind="prod.title"></a>
                </td>
                <td ng-if="prod.numberId">{{prod.brandName || '-'}}</td>
                <td ng-if="prod.numberId" class="hisData cp" dim="price" jq-popup popup-config="prod" popup-type="'product'" popup-dim="'price'">{{prod.price}}</td>
                <td ng-if="prod.numberId" class="hisData cp" dim="sellMoney" jq-popup popup-config="prod" popup-type="'product'" popup-dim="'sellMoney'">{{prod.sellMoney | bigNum}}</td>
                <td ng-if="prod.numberId" class="hisData cp" dim="sellAmount" jq-popup popup-config="prod" popup-type="'product'" popup-dim="'sellAmount'">{{prod.sellAmount | bigNum}}</td>
                <!-- 商品货源directive -->
                <td ng-if="prod.numberId" class="cp" emit-product-source emit-prod="prod">
                    <a  href="javascript:void(0);">商品货源</a>
                </td>
                <td ng-if="prod.numberId" title="点击查看历史数据" class="cp" ng-click="vm.getMonitorData($event,$index)">
                    <i class="fa fa-line-chart" aria-hidden="true"></i>
                    <!-- <i class="fa line chart icon" style="font-size: 16px;" ></i> -->
                </td>
                <td ng-if="prod.numberId" class="monitorTd" add-monitor add-monitor-config="prod" add-monitor-type="'product'">
                    <i class="fa cp" ng-class="{'fa-toggle-on':prod.collectionStatus,'fa-toggle-off':!prod.collectionStatus}" aria-hidden="true"></i>
                </td>
                <td ng-if="prod.monitorDetail" colspan="9">
                    <monitor-day-component target-id="prod.targetId" monitor-day-type="'product'"></monitor-day-component>
                </td>
            </tr>
            <tr ng-show="vm.table.products.length==0">
                <td colspan="9">
                    暂无商品
                </td>
            </tr>
        </tbody>
    </table>
    <div class="center-align pd10" ng-hide="vm.table.products.length==0">
        <dir-pagination-controls on-page-change="vm.pageChanged(newPageNumber)" pagination-id="tableShopProds" boundary-links="true"></dir-pagination-controls>
    </div>
</div>
